<?php
include "../config.php";
$Login  = new Login();
$Login->verificaLogin(true);
$Usuario = new Usuario();
$Usuario = unserialize($_SESSION["usuario"]);
$Tarefa = new Tarefas();
$Admin = new Admin();

$action = (isset($_REQUEST["action"])) ? $_REQUEST["action"] : "index";

switch ($action){
	case "index":
		$titulo="Admin";
		$totalUsuario = $Admin->totalUsuario();
		$totalCategoria = $Admin->totalCategoria();
		$arrTotalTarefas = $Admin->totalTarefas();
		$html = "html/admin/index.php";
	break;
	case "lista-usuarios":
		$titulo="Admin - lista usuarios";
		$listaUsuario =  $Admin->listaUsuarios();
		$html = "html/admin/usuario.php";
	break;
		
	
	
	default:
		$titulo="Admin";
		$totalUsuario = $Admin->totalUsuario();
		$totalCategoria = $Admin->totalCategoria();
		$arrTotalTarega = $Admin->totalTarefas();
		
		$html = "html/admin/index.php";
		break;
}

?>

<!DOCTYPE HTML>
<html lang="pt-br">
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" type="text/css" href="estilo.css">
	<title><?php echo $titulo;?></title>
	<?php include DIRVIEWS."html/topo.html"?>
    <style type="text/css">
      body {
        background-color: #f5f5f5;
      }

    input#customId{
   background: #888 !important;
   border: none !important;
   color: #000 !important;
}
    </style>
</head>
<body>
<?php include DIRVIEWS."html/menu.php"?>

<?php include DIRVIEWS."".$html;?>

 <!-- Button trigger modal -->

  <!-- Modal -->
  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
          <h4 class="modal-title">Nova tarefa</h4>
        </div>
        <div class="modal-body">
          Carregando ...
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal" id="cancela">Cancelar</button>
          <button type="button" class="btn btn-primary" id="salvar">Savar</button>
        </div>
      </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
  </div><!-- /.modal -->

<?php include DIRVIEWS."html/rodape.html"?>
<script type="text/javascript" src="/views/js/tarefas.js"></script>
<script type="text/javascript">
<!--

//-->
</script>

</body>
</html>
